#!/usr/bin/env python

from sanic import Sanic
from sanic.response import json
import threading
from buildapk import makeApk

app = Sanic()

@app.route("/")
async def test(request):
    t = threading.Thread(target=makeApk)
    t.setDaemon(False)
    t.start()
    print ("test")
    return json({"hello": "world"})

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8088)
